<template>
  <j-select-biz-component :selectItems='selectItems' :width="1000" :name="name" :inputs="inputs" :searchIcon='searchIcon' :selectButtonText="selectButtonText"  v-bind="configs" v-on="$listeners"/>
</template>

<script>
  import JSelectBizComponent from './JSelectBizComponent'

  export default {
    name: 'JSelectCust',
    components: { JSelectBizComponent },
    props: {
      value: {
        type: String,
        default: ''
      },
      name: {
        type: String,
        default: '组织'
      },
      selectButtonText:{
        type: String,
        default: '选择'
      },
      inputs:{
        type: Boolean,
        default: true
      },
      searchIcon:{
        type: String,
        default: 'search'
      },
      // 已选项
      selectItems:{
        type:Array,
        default:()=>[]
      }
    },
    data() {
      return {
        settings: {
          displayKey: 'orgName',
          returnKeys: ['id', 'orgCode'],
          listUrl:  '/cnOrgController/getPageList',
          queryParamCode: 'orgName',
          queryParamText: '组织名称',
          ellipsisLength:-1,
          columns: [
            { title: '组织名称', field: 'orgName', align: 'left', width: '50%', widthRight: '70%' },
            { title: '组织编号', field: 'orgCode', align: 'left', width: '50%' },
          ]
        }
      }
    },
    computed: {
      configs() {
        return Object.assign({ value: this.value }, this.settings, this.$attrs)
      }
    }
  }
</script>

<style lang="less" scoped></style>
